package cn.itsource.org.domain;

import cn.itsource.basic.domain.BaseDomain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
//@table 就是将表名与实体类名称做关系映射
@Table(name = "t_user")
public class User implements BaseDomain {
    @Id
    //这个注解是用来返回新增后的主键用的
    @GeneratedValue(generator = "JDBC")
    private Long id;
    private String username;
    private String email;
    private String phone;
    private String salt;
    private String password;
    @Transient
    private String configPassword;
    private Integer state;
    private Integer age;
    private Date createTime;
    private String headImg;
    private Boolean del;
    @Transient
    private String code;
}
